<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        云客客户关系管理系统
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/css/x-admin.css" media="all">
</head>

<div class="x-body">
    
    <h3 style="color:orange" >合同基本信息</h3>
    <form class="form-horizontal" action="/pact/savePact" method="post" >
         <div class="layui-form-item" >
            <label for="id" class="layui-form-label" > <span
                    class="x-red">*</span>合同编号：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="id" name="id" required=""
                       lay-verify="name" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>将会成为唯一的合同编号
            </div>
        </div> 
        <div class="layui-form-item" >
            <label for="name" class="layui-form-label" > <span
                    class="x-red">*</span>合同名称：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="name" name="name" required=""
                       lay-verify="name" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>将会成为唯一的合同名称
            </div>
        </div>
        <div class="layui-form-item">
            <label for="OrgInfoId" class="layui-form-label" >
                <span class="x-red">*</span>机构名称：
            </label>
            <div class="layui-input-inline">
                <select name="OrgInfoId" id="OrgInfoId">
                    <option value="">请选择机构</option>
					<#list orgList as ols>
						<option value="${ols.id}">${ols.name}</option>
					</#list>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="proKinds" class="layui-form-label" >
                <span class="x-red">*</span>产品类别名称：
            </label>
            <div class="layui-input-inline">
                <select name="proKinds" id="proKinds">
                <option value="">请选择产品类别名称</option>               
                 <#list proKinds as ols>                
                  <option value="${ols.id }">${ols.name}</option>
                 </#list>            
            </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="property" class="layui-form-label" >
                <span class="x-red">*</span>合同性质：
            </label>
            <div class="layui-input-inline">
                <select name="property" lay-verify="required" lay-search id="property">
                    <option value="">请选择合同性质</option>
                    <option value="新增">新增</option>
                    <option value="追踪">追踪</option>
                    <option value="维护">维护</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="kind" class="layui-form-label" > <span
                    class="x-red">*</span>合同类型：
            </label>
            <div class="layui-input-inline">
                <select name="kind" id="kind">
                    <option value="">请选择合同类型</option>
                    <option value="培训">培训</option>
                    <option value="跟进">跟进</option>
                    <option value="维护">维护</option>
                </select>
            </div>
        </div>
		<div class="layui-form-item">
			<label for="operatorId" class="layui-form-label" > <span class="x-red">*</span>合同经办人：
                </label>
			<div class="layui-input-inline">
				<input type="text" id="operatorId" name="operatorId" required=""
					   lay-verify="operatorId" autocomplete="off" class="layui-input">
			</div>
		</div>
        <div class="layui-form-item" >
            <label for="contactId" class="layui-form-label" > <span
                    class="x-red">*</span>合同联系人：
            </label>
            <div class="layui-input-inline">
               <!--  <select name="contactId" id="contactId">
                <option value="">请选择合同联系人</option>               
                 <#list contacts as ols>                
                  <option value="${ols.id }">${ols.name}</option>
                 </#list>            
            </select> -->
             <div class="layui-input-inline">
            
                 <input type="text" id="contactId" name="contactId" required=""
                       lay-verify="contactId" autocomplete="off" class="layui-input"> 
            </div> 
            
            </div>
           
        </div>
        <div class="layui-form-item">
            <label for="totalAmount" class="layui-form-label" > <span
                    class="x-red">*</span>合同总金额：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="totalAmount" name="totalAmount" required=""
                       lay-verify="totalAmount" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="payWay" class="layui-form-label" > <span
                    class="x-red">*</span>付款方式：
            </label>
            <div class="layui-input-inline">
                <select id="payWay" name="payWay">
                    <option value="">请选择付款方式</option>
                    <option value="一次性付清">一次性付清</option>
                    <option value="货物交易">货物交易</option>
                    <option value="分期付款">分期付款</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="date" class="layui-form-label" > <span
                    class="x-red">*</span>签约日期：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="date" name="date" required=""
                       lay-verify="date" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="beginDate" class="layui-form-label" > <span
                    class="x-red">*</span>合同开始时间：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="beginDate" name="beginDate" required=""
                       lay-verify="beginDate" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="endDate" class="layui-form-label" > <span
                    class="x-red">*</span>合同结束时间：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="endDate" name="endDate" required=""
                       lay-verify="endDate" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="signB" class="layui-form-label" > <span
                    class="x-red">*</span>乙方签字人：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="signB" name="signB" required=""
                       lay-verify="signB" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="signA" class="layui-form-label" > <span
                    class="x-red">*</span>甲方签字人：
            </label>
            <div class="layui-input-inline">           
                 <input type="text" id="signA" name="signA" required=""
                       lay-verify="signA" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="remark" class="layui-form-label" > <span
                    class="x-red">*</span>备注：
            </label>
            <div class="layui-input-inline">
                <input type="text" id="remark" name="remark" required=""
                       lay-verify="remark" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="checkState" class="layui-form-label" > <span
                    class="x-red">*</span>审核状态：
            </label>
			<div class="layui-input-inline">
            <select name="checkState" id="checkState">
                <option value="已审核">已审核</option>
                <option value="审核中">审核中</option>
                <option value="未审核">未审核</option>
                <option value="未通过">未通过</option>
            </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label" > </label>
            <input type="submit" class="layui-btn"  value="提交" >
        </div>
    </form>
</div>
</body>
<script src="/static/lib/layui/layui.js" charset="utf-8">
</script>
<script src="/static/js/x-layui.js" charset="utf-8">
</script>

<script>
		layui.use([ 'form', 'layer' ], function() {
			$ = layui.jquery;
			var form = layui.form(), layer = layui.layer;

			//自定义验证规则
			form.verify({
				nikename : function(value) {
					if (value.length < 5) {
						return '昵称至少得5个字符啊';
					}
				},
				pass : [ /(.+){6,12}$/, '密码必须6到12位' ],
				repass : function(value) {
					if ($('#L_pass').val() != $('#L_repass').val()) {
						return '两次输入的值不一致';
					}
				}
			});

			//监听提交
			form.on('submit(add)', function(data) {
				console.log(data);
				//发异步，把数据提交给php
				layer.alert("增加成功", {
					icon : 6
				}, function() {
					// 获得frame索引
					var index = parent.layer.getFrameIndex(window.name);
					//关闭当前frame
					parent.layer.close(index);
				});
				return false;
			});

		});
	</script>
	<script>
		var _hmt = _hmt || [];
		(function() {
			var hm = document.createElement("script");
			hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
			var s = document.getElementsByTagName("script")[0];
			s.parentNode.insertBefore(hm, s);
		})();
	</script>


</html>